%%% Copyright [heng] [litaocheng@gmail.com] 
%%% Licensed under the Apache License, Version 2.0 (the "License");
%%% you may not use this file except in compliance with the License. 
%%% You may obtain a copy of the License at 
%%%    http://www.apache.org/licenses/LICENSE-2.0 
%%% Unless required by applicable law or agreed to in writing, 
%%% software distributed under the License is distributed on an "AS IS" BASIS, 
%%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
%%% See the License for the specific language governing permissions and 
%%% limitations under the License. 
-include_lib("kernel/include/inet.hrl").

-define(debug, true).

-ifdef(debug).
-include_lib("eunit/include/eunit.hrl").
-endif.

%% common type defines
%% error type
-type ereason() :: atom().

%% erlang:now/0
-type timetick() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}. 

%% report setting record
-record(rep_setting, 
        {
            interval = 1000 :: pos_integer(), % minimum time is 1000(unit: millisecond)
            alarm_threshold,          % set worker's memory threshold to generate alarm
            mem = 1 :: pos_integer(), %  1: stand for report, 0: not report
            cpu = 1 :: pos_integer(), %  cpu info
            disk = 1 :: pos_integer(), % disk info
            job = 1 :: pos_integer(), % job info
            env = 0 :: pos_integer()  % os env info
            alarm = 1 :: pos_integer(), % send alarm info
        }).


%% reprot info
-record(mem_info,
        {
            sys_total,      % the system total memory
            availble_erl,   % the availble for erlang emulator, my or may 
                            % not equal to the sys_total
            free_memory,    % the free memory for erlang emulator
            largest_pid,    % the pid and number of allocated bytes of 
                            % the largest Erlang process on the node
                            % {pid, memsize}
            wordsize        % 32, 64, or unsupported_os
        }).

%% cpu info

%% disk info

%% job info

%% env info
